import request from "@/utils/request";

//查询全部部门数据
export const queryAllApi = () => {
    return request.get('/depts');
}

//新增
export const addDeptApi = (dept) => request.post('/depts',dept);


//根据id查询
export const queryByIdApi = (id) => request.get(`/depts/${id}`);

//修改部门
export const updateDeptApi = (data) => request.put('/depts', data)

//删除部门
export const deleteDeptApi = (id) => request.delete(`/depts?id=${id}`)